//
//  BaseScene.h
//  HealthyLifestyle
//
//  Created by 找汽配 on 16/7/2.
//  Copyright © 2016年 祥运. All rights reserved.
//

#import <UIKit/UIKit.h>

@class MBProgressHUD;

@interface XYViewController : UIViewController

- (BOOL)needLogin;

#pragma mark - Controller

- (BOOL)isPriceStringWhenInputting:(NSString *)string;
- (NSInteger)seq;

#pragma mark - 相机 & 相册

- (void)selectImageWithImagePicker;
- (void)openCamera;
- (void)openAlbum;
- (UIImage *)imageWithSourceType:(UIImagePickerControllerSourceType)sourceType info:(NSDictionary<NSString *,id> *)info;

#pragma mark - 权限检查

/** 检查相机权限 */
- (void)checkForCameraAuthorizationWithSuccess:(void(^)())success;
/** 检查相册权限 */
- (void)checkForPhotoLibraryAuthorizationWithSuccess:(void(^)())success;

#pragma mark - Navigation

- (void)setTitleViewWithTitle:(NSString *)title;

#pragma mark - Progress

- (MBProgressHUD *)showProgressHUD;
- (void)hideProgressHUD:(MBProgressHUD *)hud;

#pragma mark - Alert

- (void)presentAlertWithTitle:(NSString *)title message:(NSString *)message dismissAfterDelay:(NSTimeInterval)delay completion:(void(^)())completion;

#pragma mark - Login

- (void)presentLogin;

@end
